import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
export enum UserRole {
  '女' = '0',
  '男' = '1',
}

@Entity()
export class User {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ nullable: false })
  name: string;

  @Column({ nullable: true })
  phone: string;

  @Column({
    enum: UserRole['女'],
    default: '0',
    nullable: false,
  })
  sex: string;

  @Column({ nullable: false })
  age: number;
}
